/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
/**
 * 判断设备种类，返回值为0，1，2
 * 0为iPhone
 * 1为安卓
 * 2为PC
 * @returns {Number}
 */
function judgeDevice()
{
    //iPhone手机页面
    if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) {
        return 1;
    }
    //安卓手机页面
    else if (/(Android)/i.test(navigator.userAgent)) {
        return 2;
    }
    //电脑页面
    else {
        return 3;
    }
}

function showHideSideBar()
{
    let btn=document.getElementById('showHideSideBarBtn');
    
    let sideBar=document.getElementById('left');
    
    if(sideBar.style.display==='none')
    {
        sideBar.style.display='block';
    }
    
    else if(sideBar.style.display===''||sideBar.style.display==='block')
    {
        sideBar.style.display='none';
    }
}




